package com.ay.selfservicemachine.http;

import com.ay.selfservicemachine.http.callback.HttpErrorListener;
import com.honghea.rxhttp.exception.ApiException;


/**
 * 网络请求错误传递
 */
public class ApiExceptionClassifierReport {
    public final static int SafetyDevicesError = 21110;//安全设备验证失败
    public final static int FaceError = 80005;//人脸识别失败，请换一种方式登录
    public static HttpErrorListener httpErrorListener;

    public static void setHttpErrorListener(HttpErrorListener httpErrorListener) {
        ApiExceptionClassifierReport.httpErrorListener = httpErrorListener;
    }

    public static void afterApiExceptionThrow(ApiException e) {
        if (httpErrorListener != null) {
            httpErrorListener.afterApiExceptionThrow(e);
        }

    }

}
